//
//  PKRequestManger.h
//  A 片刻
//
//  Created by lanou3g on 21/7/15.
//  Copyright (c) 2015年 lanou3g11. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef void(^requestFinish)(NSData *data);
typedef void(^requestError)(NSError *error);
typedef NS_ENUM(NSInteger, RequestType)
{
    POST,
    GET
};

@interface MYRequestManger : NSObject<NSURLConnectionDataDelegate>
@property (nonatomic,copy)requestFinish requestFinish;
@property (nonatomic,copy)requestError requestError;
@property(nonatomic,strong)NSMutableData *data;

- (void)manager:(RequestType)postOrGet RequestWith:(NSString *)urlStr parDic:(NSDictionary*)parDic finish:(requestFinish)finish error:(requestError)error;

+ (void)manager:(RequestType)postOrGet RequestWith:(NSString *)urlStr parDic:(NSDictionary*)parDic finish:(requestFinish)finish error:(requestError)error;


@end
